﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Common;
using BusinessLayer;

namespace BoletoElectronicoDesktop.Login
{
    public partial class FormConfirmNewPass : Form
    {

        public FormConfirmNewPass(Common.Util.Funcionalidad Use)
        {
            InitializeComponent();
            lblErr.Visible = false;
        }

        private void btnIngresar_Click(object sender, EventArgs e)
        {
            bool error = false;
            lblErr.Visible = error;
            string User = string.Empty;
            try
            {
                BizAdmin.ChangePassword(txtNewPass.Text, txtConfirmNewPass.Text);
            }
            catch (ApplicationException appEx)
            {
                error = true;
                lblErr.Text = appEx.Message;
                lblErr.Visible = error;
            }
            if (!error)
            {
                this.Close();
            }
        
        }


    }
}
